package a.h;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyVetoException;

class n
  extends d
  implements lb.c_
{
  private vd n;
  private Color o;
  private Color p;
  private boolean q;
  
  public n(ic paramic, ob paramob)
  {
    super(paramic);
    a(paramic, paramob);
  }
  
  private void a(ic paramic, ob paramob)
  {
    int i = ec.t;
    this.n = new vd(nb.b(paramic.o()), ic.b(paramic), ic.a(paramic));
    this.n.setMinimumSize(new Dimension(20, 16));
    this.n.setPreferredSize(new Dimension(20, 16));
    this.n.setHorizontalAlignment(10);
    this.p = this.n.getBackground();
    if (((i == 0) && (paramic.r())) || ((i != 0) || ((paramic.b()) || (paramic.q()))))
    {
      lb locallb = new lb(paramic, this.n, paramob);
      locallb.a(this);
      this.n.addActionListener(new ActionListener()
      {
        private final lb val$popup;
        
        public void actionPerformed(ActionEvent paramAnonymousActionEvent)
        {
          this.val$popup.a((Color)n.this.n());
          this.val$popup.c().show(n.this.n, 0, n.this.n.getHeight());
        }
      });
      if (i != 0) {
        return;
      }
      if (!ec.s) {}
    }
    else
    {
      this.n.addActionListener(new ActionListener()
      {
        private final ic val$item;
        private final ob val$gf;
        
        public void actionPerformed(ActionEvent paramAnonymousActionEvent)
        {
          String str = nb.a(this.val$item, this.val$gf);
          Color localColor = wd.a(n.this.n, str, n.this.o, ic.b(this.val$item));
          if (localColor != null) {
            n.this.a(localColor);
          }
        }
      });
    }
    this.o = ((Color)this.i.o());
    this.q = false;
    d(this.i.m());
    c(this.i.f());
  }
  
  public Object n()
  {
    return this.o;
  }
  
  public void a(Object paramObject)
  {
    a(nb.b(paramObject));
  }
  
  public boolean o()
  {
    return this.n.isEnabled();
  }
  
  public void c(boolean paramBoolean)
  {
    boolean bool = this.n.isEnabled();
    if (ec.t == 0)
    {
      if (bool != paramBoolean) {
        this.n.setEnabled(paramBoolean);
      }
    }
    else {
      a(bool, paramBoolean);
    }
  }
  
  public boolean p()
  {
    return this.q;
  }
  
  public void d(boolean paramBoolean)
  {
    int i = ec.t;
    if ((i != 0) || (this.q != paramBoolean))
    {
      boolean bool = this.q;
      if (i == 0)
      {
        this.q = paramBoolean;
        if (paramBoolean)
        {
          this.n.setText("");
          this.n.setIcon(null);
          if (i != 0) {
            break label83;
          }
          this.n.setBackground(ic.a);
          if (!ec.s) {
            break label82;
          }
        }
      }
      this.n.setBackground(this.p);
      label82:
      label83:
      b(bool, paramBoolean);
    }
  }
  
  public JComponent f()
  {
    return this.n;
  }
  
  void a(Color paramColor)
  {
    Color localColor = this.o;
    if ((ec.t != 0) || (nb.a(localColor, paramColor)))
    {
      try
      {
        b(e, localColor, paramColor);
      }
      catch (PropertyVetoException localPropertyVetoException)
      {
        this.n.a(localColor);
        return;
      }
      this.o = paramColor;
      this.n.a(paramColor);
      a(localColor, paramColor);
    }
  }
  
  void a(JPopupMenu paramJPopupMenu, Color paramColor)
  {
    a(paramColor);
    d(false);
    paramJPopupMenu.setVisible(false);
  }
  
  public void a(JPopupMenu paramJPopupMenu, Object paramObject)
  {
    a(paramJPopupMenu, (Color)paramObject);
  }
  
  public void a()
  {
    this.n.setSelected(false);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.h.n

 * JD-Core Version:    0.7.0.1

 */